<template>
	<div class="shop_dialog">
		<el-dialog :title="title" :visible.sync="dialogShow" width="70%" :before-close="handleClose">
			
			<slot>
				<span>没有内容</span>
			</slot>
			<!--<span slot="footer" class="dialog-footer">
			    <el-button @click="handleClose">取 消</el-button>
			    <el-button type="primary" @click="handleClose">确 定</el-button>
            </span>-->
		</el-dialog>
	</div>
</template>

<script>
	export default {
		name: "mydialog",
		props: {
			isShow: {
				type: Boolean,
				default: false
			},
			title: {
				type: String
			}
		},
		data() {
			return {
				dialogShow:this.isShow
			};
		},
		methods: {
			//弹框隐藏后执行
			handleClose() {
				this.dialogShow = false
				this.$emit('on-close')
			},
		},
        watch: {
            isShow () {
                this.dialogShow = this.isShow;
            }
        },
        mounted:function(){
        	console.log(this.title)
        }
	}
</script>

<style scoped="scoped">

</style>